export default function (config) {
  let needToken = ["/draw", "/getcharm"];
  function verify(url) {
    return needToken.some((el) => config.url.includes(el));
  }
  let res = verify(config.url);
  if (res) {
    config.header = {
      "x-token": wx.getStorageSync("token"),
    };
  }
  config.timeout = 5000;
  wx.request(config);
}
